import Vue from 'vue';
import VueRouter from 'vue-router'
import Home from '../views/home'
import User from '../views/user'

Vue.use(VueRouter);

const routes = [
  {
    path: '/home',
    component: Home
  },
  {
    path: '/user',
    component: User
  }
]

const router = new VueRouter({
  routes // (缩写) 相当于 routes: routes
})

export default router
